<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<LCA.Community.DAL.Model.Event>" %>
<%@ Import Namespace="LCA.Community.DAL.Model" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContent" runat="server">
    <link href="<%= Url.Content("~/Content/ui.datepicker.2.css") %>" rel="stylesheet" type="text/css" />
    <link href="<%= Url.Content("~/Content/redmond/redmon.css") %>" rel="stylesheet" type="text/css" />
    <script src="<%= Url.Content("~/Scripts/ui.datepicker.2.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $('#date').datepicker({
                dateFormat: 'yy/mm/dd HH:II',
                minDate: new Date(2000,1,1),
                timePos: 'top'
            });
        });
    </script> 
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content-main">
        <h2><img src="<%= Url.Content("~/Content/images/FinalDesign/Icons/alarmclock24.png") %>" />Editar evento</h2>
        <% Html.EnableClientValidation(); %>
        <%using (Html.BeginForm("Edit", "Events", new { eventID = Model.RowKey, groupID = ViewData["groupname"] })){ %>
                <table cellspacing="10">
                    <tr>
                        <td>
                            <%= Html.LabelFor(m => m.Name) %>
                        </td>
                        <td>
                            <%= Html.TextBoxFor(m => m.Name, new { size = "30"})%>
                            <%= Html.ValidationMessageFor(m => m.Name)%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= Html.LabelFor(m => m.Description) %>
                        </td>
                        <td>
                            <%= Html.TextAreaFor(m => m.Description, new { style = "width:400px;height:200px" })%>
                            <%= Html.ValidationMessageFor(m => m.Description)%>                         
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= Html.LabelFor(m => m.Date) %>
                        </td>
                        <td>                   
                            <%= Html.TextBox("Date", Model.Date.Year < 1600 ? "" : Model.Date.ToString(), new { size="20", id="date" })%>                
                            <%= Html.ValidationMessageFor(m => m.Date) %>                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= Html.LabelFor(m => m.Capacity) %>
                        </td>
                        <td>
                            <%= Html.TextBoxFor(m => m.Capacity, new { size = "4" })%>
                            <%= Html.ValidationMessageFor(m => m.Capacity) %>                        
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= Html.LabelFor(m => m.Place) %>
                        </td>
                        <td>
                            <%= Html.TextBoxFor(m => m.Place, new { size = "30" })%>
                            <%= Html.ValidationMessageFor(m => m.Place) %>   
                        </td>
                    </tr>
                </table>
                <br />

                <input type="submit" value="Actualizar" />
        <%} %>                
    </div>
    <div class="content-right">
        <% Html.RenderPartial("GroupMenu", (LCA.Community.DAL.Model.Group)ViewData["group"]); %>
    </div>
</asp:Content>
